﻿using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using K9Nano.LayIM.Models;

namespace K9Nano.LayIM.Stores
{
    public interface IChatFriendStore
    {
        Task<IEnumerable<LayIMGroup>> GetGroupsAsync(string userId, CancellationToken cancellation);

        Task<IEnumerable<LayIMGroupMember>> GetFriendsAsync(string userId, CancellationToken cancellation);

        Task<LayIMGroupMember> GetMembersAsync(string groupId, CancellationToken cancellation);

        Task<IEnumerable<string>> GetOnlineFriendsAsync(string userId, CancellationToken cancellation);

        Task<LayIMUser> GetUserAsync(string userId, CancellationToken cancellation);

        Task<LayIMGroup> GetGroupAsync(string groupId, CancellationToken cancellation);

        Task OnlineAsync(string userId, CancellationToken cancellation);

        Task OfflineAsync(string userId, CancellationToken cancellation);

        Task<string> AddGroupAsync(string userId, LayIMGroup group, CancellationToken cancellation);

        Task AddFriendToGroupAsync(string friendId, string groupId, CancellationToken cancellation);

        Task<LayIMAddFriend> TryAddRoomToAppGroupAsync(string roomId, string staffId, string app, CancellationToken cancellation);

        Task RemoveFriendFromGroupAsync(string friendId, string groupId, CancellationToken cancellation);

        Task RemoveGroupsAsync(string groupId, CancellationToken cancellation);
    }
}